<template>
  <div>
 {{msg}}
 {{todoList}}
 <img ref="Href" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.2qqtouxiang.com%2Fpic%2FTX9782_05.jpg&refer=http%3A%2F%2Fimg.2qqtouxiang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1659424821&t=d1924c93784bdf9d3852840d30f657bd" alt="">
 <button @click="Hclick">点我隐藏</button>
  </div>
</template>

<script setup lang="ts">
import { computed, ref } from 'vue';

const msg = ref<string>('今天天气很好')
const todoList = ref<{
  id:number
  name:string
  done:boolean
}[]>([])
todoList.value = [{
  id:1,name:'rose',done:false
}]

const Fn = computed<number>(()=>{
  return todoList.value.filter(item=>!item.done).length
})
console.log(Fn.value)
const img = document.createElement('img')
const Href = ref<HTMLImageElement | null>(null)
const Hclick = ()=>{
  if(Href.value){
    Href.value.src = ''
  }
  console.log(Href.value?.src);
  
}
</script>

<style scoped>

</style>